package com.iwords.service;


/**
 * @author       BOLIN.HBC 
 * @time         2011-3-6    
 * @description  用户-SERVICE       
 */


import java.util.List;

import com.iwords.service.object.FeedbackEntity;
import com.iwords.service.object.UserEntity;
import com.iwords.service.object.UserSysConfigEntity;

import javax.ejb.Remote;
@Remote 
public interface UserService {

	void create(UserEntity user);

	void edit(UserEntity user);
	
	UserEntity findUser(UserEntity user);

	void remove(UserEntity user);

	UserEntity find(Object id);

	public boolean isContain(UserEntity user);
	
	List<UserEntity> findAll();

	List<UserEntity> findRange(int[] range);

	int count();
	
	public void updateCurrentLib(UserEntity user);
	
	public boolean updateUserSysConfig(UserEntity userEntity);
	
	/**
	 * 更新用户假期表 by fzc
	 * @param userEntity
	 * @return
	 */
	public boolean updateUserVacation(UserEntity userEntity,int delayDays);
	
	/**
	 * 查找最新的反馈信息
	 * @return
	 */
	public List<FeedbackEntity> findLatestFeedbacks();
	
	/**
	 * 提交反馈
	 * @param userid
	 * @return
	 */
	public boolean addFeedback(Long userid,FeedbackEntity feedback);
	
	/**
	 * 获取该用户当天的某一配置
	 * 
	 * @param 	config
	 * 			查询配置信息
	 * @return	UserSysConfigEntity
	 *  		用户配置信息
	 */
	public UserSysConfigEntity getUserConfigByUserIdToday(UserSysConfigEntity config);

        public boolean updateUserVacationFormNow(UserEntity userEntity, int delayDays);
}
